package com.xiaxiang.xiawan.Effect.Adapter;

import android.util.Log;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2017-10-26.
 */

public class EffectData {
    public final static String CREATEDATEKEY = "createDate";
    public final static String THUMBNAILKEY = "thumbnail";
    public final static String EFFECTURLKEY = "url";
    public final static String NAMEKEY = "name";
    public final static String IDKEY = "id";
    public final static String DEMOURLKEY = "demoUrl";
    public final static String MD5_KEY = "md5";
    public String mEffectName = "";
    public String mEffectUrl="";
    public String mEffectThumbnailUrl = "";
    public String mEffectMediaUrl="";
    public String mMd5 = "";
    public String mCreateData = "";
    public String mEffectId = "";
    public int mEffectIndex = 0;
    public boolean mIsSelect = false;
    public void setObjectData(JSONObject objectData){
        try {
            mEffectName = objectData.getString(NAMEKEY);
            mEffectUrl = objectData.getString(EFFECTURLKEY);
            mEffectThumbnailUrl = objectData.getString(THUMBNAILKEY);
            mEffectId = objectData.getString(IDKEY);
            mEffectMediaUrl = objectData.getString(DEMOURLKEY);
            mCreateData = objectData.getString(CREATEDATEKEY);
            mMd5 = objectData.getString(MD5_KEY);
        } catch (JSONException e) {
            e.printStackTrace();
        }
    }
}
